From: Jasper St. Pierre Date: Thu, 8 Sep 2011 21:11:45 +0000 (-0400) Subject: userMenu: Update the user information if the object is already loaded X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7646 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=543b29efe75e6073f03ba72580a66914b152f7fb;p=gnome-shell.git userMenu: Update the user information if the object is already loaded Any time we get a cached user object from the AccountsService, it will already be loaded. https://bugzilla.gnome.org/show_bug.cgi?id=658605 --- diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js index 24ad4183a..15a627a2e 100644 --- a/js/ui/userMenu.js +++ b/js/ui/userMenu.js @@ -194,6 +194,10 @@ IMStatusChooserItem.prototype = { this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUser)); + this.actor.connect('notify::mapped', Lang.bind(this, function() { + if (this.actor.mapped) + this._updateUser(); + })); }, // Override getColumnWidths()/setColumnWidths() to make the item @@ -421,6 +425,7 @@ UserMenuButton.prototype = { box.add(this._name, { y_align: St.Align.MIDDLE, y_fill: false }); this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUserName)); this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUserName)); + this._updateUserName(); this._createSubMenu(); this._userManager.connect('notify::is-loaded',